import QtQuick 1.0

Rectangle 
{
	color : "#C9E2FF"
	id:container
	width: 1280
	height: 720
	opacity: 1
	property alias idContent: menuConec.idContent
	property alias passContent:  menuConec.passContent

	signal connect(string idContent, string passContent)


        PropertyAnimation { id: animationIdFail; target: idFailed; property: "opacity"; from:0; to:1; duration: 500;  }
        PropertyAnimation { id: animationIdDouble; target: idDouble; property: "opacity"; from:0; to:1; duration: 500;  }
        function authentificationFail()
        {
            console.log("identification failed")
            idDouble.visible = false
            idFailed.visible= true
            animationIdFail.running = true
            return "ok"
        }
        function authentificationDouble()
        {
        	console.log("identification double")
        	idFailed.visible = false
        	idDouble.visible = true
        	animationIdDouble.running = true
        	return "ok"
        }

        function authentificationOK()
        {
             console.log("ok")
             return "ok"
        }
	BorderImage
	{
		id: titre
		width: 490
		height: 218
		opacity:1
		y: 20
		NumberAnimation on opacity { from:0; to:0.8; duration: 1200}
		anchors.horizontalCenter: parent.horizontalCenter
		source: "titre.png"
	}

	Menu
	{
		id:menuConec
		y : 220
		border.bottom: 0;
	}

	Text
	{
		id: idFailed
		x: 493
		y: 651
		color: "#ec0d0d"
		text: "Identification Failed"
		visible: false
		opacity: 1
		anchors.bottom: parent.bottom
		anchors.bottomMargin: 52
		anchors.horizontalCenter: parent.horizontalCenter
		font.pixelSize: 24
	}
	Text
	{
		id: idDouble
		x: 493
		y: 651
		color: "#ec0d0d"
		text: "Already identified"
		visible: false
		opacity: 1
		anchors.bottom: parent.bottom
		anchors.bottomMargin: 52
		anchors.horizontalCenter: parent.horizontalCenter
		font.pixelSize: 24
	}
}
